﻿@model Provider
@section ToolBar{}
<div class="l-m-form">
    <form mark="LedinghuoForm" action="@Url.Action("Edit")" method="POST">
        @Html.LEditorFor(m => m.CompanyNo, Html.TextBoxFor, false)
        @Html.LEditorFor(m => m.CompanyCode, Html.TextBoxFor, false)
        @Html.LEditorFor(m => m.CompanyName, Html.TextBoxFor, false)
        @Html.LEditorFor(m => m.FullName, Html.TextBoxFor, false)
        @Html.LEditorFor(m => m.ContactName, Html.TextBoxFor, false)
        @Html.LTextEditAreaFor(m => m.AreaId, new { req = new { message = "请选择区域" } }, null)

        <div class="form-item">
            <div class="label c5">负责人</div>
            <div class="req">*</div>
            <div class="content">
                @Html.LTextEdit("EmployeeBox", Model.Employee==null?"":Model.Employee.EmployeeName, "EmployeeId", "text", new { data = Model.EmployeeId, @class = "inp-text bc1 bgc0 inp-lg7 inp-hg6 commonbox", fa = "fa-angle-down" }, new { req = new { message = "负责人不允许空" } }, null)
            </div>
        </div>
        @Html.LEditorFor(m => m.Mb, Html.TextBoxFor)
        @Html.LEditorFor(m => m.Email, Html.TextBoxFor)
        <div class="form-item">
            <div class="label c5">地址</div>
            <div class="content">
                @Html.LTextEdit("Address", Model.Address, new { @class = "inp-text bc1 bgc0 inp-lg10 inp-hg6 mapaddress" },null,null)
            </div>
        </div>
        @Html.LEditorFor(m => m.Description, Html.TextAreaFor)
        @Html.LButton("保存")
    </form>
    @Html.LPageError()
</div>
<script type="text/javascript">
    $(function () {
        $.area();
       
        //负责人
        $("#EmployeeBox").employee(function ($this) {
            $("#EmployeeId").val($this.attr("data")).input().doVerification();
        });

        $("a[mark=MapAddree]").bind("click", function () {
            $.LWindow({
                title: "地图",
                id: "Window-Map",
                width: 1024,
                height: 500,
                url: "/Customer/MapAddress",
                callback: function () {

                }
            });
        });
    });
</script>